<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页 - 家族谱</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&display=swap');
        body {
            font-family: 'Noto Sans SC', sans-serif;
        }
        .sidebar-item.active {
            background-color: rgba(255, 255, 255, 0.1);
            border-left: 4px solid #fff;
        }
        @media (max-width: 768px) {
            .sidebar {
                display: none;
            }
            .sidebar.show {
                display: block;
                position: fixed;
                top: 0;
                left: 0;
                width: 250px;
                height: 100vh;
                z-index: 50;
            }
        }
    </style>
</head>
<body class="bg-gray-100">
    <!-- 移动端顶部导航 -->
    <div class="md:hidden bg-white shadow-md py-3 px-4 flex justify-between items-center sticky top-0 z-10">
        <button id="menu-toggle" class="text-gray-700">
            <i class="fas fa-bars text-xl"></i>
        </button>
        <div class="text-center">
            <h1 class="text-xl font-bold text-gray-800">首页</h1>
        </div>
        <div>
            <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                 class="w-8 h-8 rounded-full" alt="用户头像">
        </div>
    </div>

    <div class="flex min-h-screen">
        <!-- 侧边栏 -->
        <div id="sidebar" class="sidebar bg-gray-800 text-white w-64 py-4 flex-shrink-0 hidden md:block">
            <div class="px-6 py-4">
                <h1 class="text-2xl font-bold">家族谱</h1>
                <p class="text-gray-400 text-sm">家族网站与家谱制作平台</p>
            </div>
            <div class="mt-6">
                <nav>
                    <a href="home.html" class="sidebar-item active flex items-center px-6 py-3 text-white hover:bg-gray-700">
                        <i class="fas fa-home mr-3"></i>
                        <span>首页</span>
                    </a>
                    <a href="profile.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-user mr-3"></i>
                        <span>个人资料</span>
                    </a>
                    <a href="family-tree.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-sitemap mr-3"></i>
                        <span>家谱编辑</span>
                    </a>
                    <a href="genealogy.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-project-diagram mr-3"></i>
                        <span>世系图生成</span>
                    </a>
                    <a href="social.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-comments mr-3"></i>
                        <span>家族社交圈</span>
                    </a>
                    <a href="events.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-calendar-alt mr-3"></i>
                        <span>家族活动</span>
                    </a>
                    <a href="stories.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-book-open mr-3"></i>
                        <span>家族故事与历史</span>
                    </a>
                    <a href="settings.html" class="sidebar-item flex items-center px-6 py-3 text-gray-300 hover:bg-gray-700 hover:text-white">
                        <i class="fas fa-cog mr-3"></i>
                        <span>设置</span>
                    </a>
                </nav>
            </div>
            <div class="mt-auto px-6 py-4">
                <div class="flex items-center">
                    <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                         class="w-10 h-10 rounded-full mr-3" alt="用户头像">
                    <div>
                        <p class="text-sm font-medium">张三</p>
                        <p class="text-xs text-gray-400">查看个人资料</p>
                    </div>
                </div>
            </div>
        </div>

        <!-- 主内容区 -->
        <div class="flex-1 overflow-auto">
            <div class="container mx-auto py-6 px-4">
                <!-- 欢迎横幅 -->
                <div class="bg-white rounded-lg shadow-md p-6 mb-6">
                    <div class="flex items-center justify-between">
                        <div>
                            <h2 class="text-2xl font-bold text-gray-800">欢迎回来，张三</h2>
                            <p class="text-gray-600 mt-1">今天是个探索家族历史的好日子</p>
                        </div>
                        <button class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-md">
                            <i class="fas fa-plus mr-2"></i>添加家族成员
                        </button>
                    </div>
                </div>

                <!-- 快速访问卡片 -->
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
                    <div class="bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow">
                        <div class="flex items-center">
                            <div class="bg-blue-100 p-3 rounded-full">
                                <i class="fas fa-sitemap text-blue-500 text-xl"></i>
                            </div>
                            <div class="ml-4">
                                <h3 class="text-lg font-semibold">我的家谱</h3>
                                <p class="text-gray-500 text-sm">已添加 24 位家族成员</p>
                            </div>
                        </div>
                        <a href="family-tree.html" class="text-blue-500 text-sm font-medium mt-4 inline-block">
                            查看家谱 <i class="fas fa-arrow-right ml-1"></i>
                        </a>
                    </div>
                    
                    <div class="bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow">
                        <div class="flex items-center">
                            <div class="bg-green-100 p-3 rounded-full">
                                <i class="fas fa-calendar-alt text-green-500 text-xl"></i>
                            </div>
                            <div class="ml-4">
                                <h3 class="text-lg font-semibold">近期活动</h3>
                                <p class="text-gray-500 text-sm">3 个即将到来的家族活动</p>
                            </div>
                        </div>
                        <a href="events.html" class="text-green-500 text-sm font-medium mt-4 inline-block">
                            查看活动 <i class="fas fa-arrow-right ml-1"></i>
                        </a>
                    </div>
                    
                    <div class="bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow">
                        <div class="flex items-center">
                            <div class="bg-purple-100 p-3 rounded-full">
                                <i class="fas fa-comments text-purple-500 text-xl"></i>
                            </div>
                            <div class="ml-4">
                                <h3 class="text-lg font-semibold">家族社交</h3>
                                <p class="text-gray-500 text-sm">12 条未读消息</p>
                            </div>
                        </div>
                        <a href="social.html" class="text-purple-500 text-sm font-medium mt-4 inline-block">
                            查看动态 <i class="fas fa-arrow-right ml-1"></i>
                        </a>
                    </div>
                    
                    <div class="bg-white rounded-lg shadow-md p-5 hover:shadow-lg transition-shadow">
                        <div class="flex items-center">
                            <div class="bg-amber-100 p-3 rounded-full">
                                <i class="fas fa-book-open text-amber-500 text-xl"></i>
                            </div>
                            <div class="ml-4">
                                <h3 class="text-lg font-semibold">家族故事</h3>
                                <p class="text-gray-500 text-sm">探索家族的历史与传承</p>
                            </div>
                        </div>
                        <a href="stories.html" class="text-amber-500 text-sm font-medium mt-4 inline-block">
                            阅读故事 <i class="fas fa-arrow-right ml-1"></i>
                        </a>
                    </div>
                </div>

                <!-- 提醒与通知 -->
                <div class="bg-white rounded-lg shadow-md p-6 mb-6">
                    <h3 class="text-xl font-bold text-gray-800 mb-4">提醒与通知</h3>
                    <div class="space-y-4">
                        <div class="flex items-center p-3 bg-blue-50 rounded-lg">
                            <div class="bg-blue-100 p-2 rounded-full">
                                <i class="fas fa-birthday-cake text-blue-500"></i>
                            </div>
                            <div class="ml-3">
                                <p class="text-gray-800">李四的生日就在下周三 (6月15日)</p>
                                <p class="text-sm text-gray-500">别忘了送上祝福</p>
                            </div>
                            <button class="ml-auto text-blue-500">
                                <i class="fas fa-bell-slash"></i>
                            </button>
                        </div>
                        
                        <div class="flex items-center p-3 bg-green-50 rounded-lg">
                            <div class="bg-green-100 p-2 rounded-full">
                                <i class="fas fa-calendar-day text-green-500"></i>
                            </div>
                            <div class="ml-3">
                                <p class="text-gray-800">家族夏季聚会</p>
                                <p class="text-sm text-gray-500">6月25日，上海市浦东新区世纪公园</p>
                            </div>
                            <button class="ml-auto text-green-500">
                                <i class="fas fa-check-circle"></i>
                            </button>
                        </div>
                        
                        <div class="flex items-center p-3 bg-purple-50 rounded-lg">
                            <div class="bg-purple-100 p-2 rounded-full">
                                <i class="fas fa-user-plus text-purple-500"></i>
                            </div>
                            <div class="ml-3">
                                <p class="text-gray-800">王五请求加入您的家族网络</p>
                                <p class="text-sm text-gray-500">声称是您父亲这边的远房亲戚</p>
                            </div>
                            <div class="ml-auto flex space-x-2">
                                <button class="text-green-500 hover:text-green-600">
                                    <i class="fas fa-check"></i>
                                </button>
                                <button class="text-red-500 hover:text-red-600">
                                    <i class="fas fa-times"></i>
                                </button>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 最近活动 -->
                <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
                    <!-- 家族动态 -->
                    <div class="lg:col-span-2">
                        <div class="bg-white rounded-lg shadow-md p-6">
                            <h3 class="text-xl font-bold text-gray-800 mb-4">家族动态</h3>
                            
                            <div class="space-y-6">
                                <!-- 动态1 -->
                                <div class="border-b border-gray-100 pb-6">
                                    <div class="flex items-start">
                                        <img src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                                             class="w-10 h-10 rounded-full" alt="赵六头像">
                                        <div class="ml-3 flex-1">
                                            <div class="flex justify-between">
                                                <p class="font-medium">赵六</p>
                                                <span class="text-sm text-gray-500">今天 10:23</span>
                                            </div>
                                            <p class="text-gray-800 mt-2">分享几张上周家族聚会的照片，大家玩得很开心！</p>
                                            <div class="mt-3 grid grid-cols-3 gap-2">
                                                <img src="https://images.unsplash.com/photo-1529156069898-49953e39b3ac?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" 
                                                     class="rounded-lg w-full h-24 object-cover" alt="聚会照片1">
                                                <img src="https://images.unsplash.com/photo-1516478177764-9fe5bd7e9717?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" 
                                                     class="rounded-lg w-full h-24 object-cover" alt="聚会照片2">
                                                <img src="https://images.unsplash.com/photo-1484712401471-05c7215830eb?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" 
                                                     class="rounded-lg w-full h-24 object-cover" alt="聚会照片3">
                                            </div>
                                            <div class="mt-3 flex items-center space-x-4">
                                                <button class="flex items-center text-gray-500 hover:text-blue-500">
                                                    <i class="far fa-heart mr-1"></i>
                                                    <span>12</span>
                                                </button>
                                                <button class="flex items-center text-gray-500 hover:text-blue-500">
                                                    <i class="far fa-comment mr-1"></i>
                                                    <span>4</span>
                                                </button>
                                                <button class="flex items-center text-gray-500 hover:text-blue-500">
                                                    <i class="far fa-share-square mr-1"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                
                                <!-- 动态2 -->
                                <div>
                                    <div class="flex items-start">
                                        <img src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                                             class="w-10 h-10 rounded-full" alt="钱七头像">
                                        <div class="ml-3 flex-1">
                                            <div class="flex justify-between">
                                                <p class="font-medium">钱七</p>
                                                <span class="text-sm text-gray-500">昨天 16:45</span>
                                            </div>
                                            <p class="text-gray-800 mt-2">我整理了一些老照片，发现了爷爷年轻时的珍贵照片，大家来看看！</p>
                                            <div class="mt-3">
                                                <img src="https://images.unsplash.com/photo-1529626455594-4ff0802cfb7e?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" 
                                                     class="rounded-lg w-full max-h-64 object-cover" alt="老照片">
                                            </div>
                                            <div class="mt-3 flex items-center space-x-4">
                                                <button class="flex items-center text-gray-500 hover:text-blue-500">
                                                    <i class="far fa-heart mr-1"></i>
                                                    <span>23</span>
                                                </button>
                                                <button class="flex items-center text-gray-500 hover:text-blue-500">
                                                    <i class="far fa-comment mr-1"></i>
                                                    <span>8</span>
                                                </button>
                                                <button class="flex items-center text-gray-500 hover:text-blue-500">
                                                    <i class="far fa-share-square mr-1"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <button class="w-full mt-6 text-blue-500 hover:text-blue-600 text-center">
                                查看更多动态
                            </button>
                        </div>
                    </div>
                    
                    <!-- 即将到来的生日 -->
                    <div>
                        <div class="bg-white rounded-lg shadow-md p-6">
                            <h3 class="text-xl font-bold text-gray-800 mb-4">即将到来的生日</h3>
                            
                            <div class="space-y-4">
                                <div class="flex items-center">
                                    <div class="relative">
                                        <img src="https://images.unsplash.com/photo-1500648767791-00dcc994a43e?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                                             class="w-12 h-12 rounded-full" alt="李四头像">
                                        <div class="absolute -bottom-1 -right-1 bg-blue-500 text-white rounded-full w-6 h-6 flex items-center justify-center text-xs">
                                            <i class="fas fa-gift"></i>
                                        </div>
                                    </div>
                                    <div class="ml-3">
                                        <p class="font-medium">李四</p>
                                        <p class="text-sm text-gray-500">6月15日 (5天后)</p>
                                    </div>
                                    <button class="ml-auto bg-blue-500 hover:bg-blue-600 text-white text-sm px-3 py-1 rounded">
                                        送祝福
                                    </button>
                                </div>
                                
                                <div class="flex items-center">
                                    <div class="relative">
                                        <img src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                                             class="w-12 h-12 rounded-full" alt="周八头像">
                                        <div class="absolute -bottom-1 -right-1 bg-blue-500 text-white rounded-full w-6 h-6 flex items-center justify-center text-xs">
                                            <i class="fas fa-gift"></i>
                                        </div>
                                    </div>
                                    <div class="ml-3">
                                        <p class="font-medium">周八</p>
                                        <p class="text-sm text-gray-500">6月20日 (10天后)</p>
                                    </div>
                                    <button class="ml-auto bg-blue-500 hover:bg-blue-600 text-white text-sm px-3 py-1 rounded">
                                        送祝福
                                    </button>
                                </div>
                                
                                <div class="flex items-center">
                                    <div class="relative">
                                        <img src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" 
                                             class="w-12 h-12 rounded-full" alt="吴九头像">
                                        <div class="absolute -bottom-1 -right-1 bg-blue-500 text-white rounded-full w-6 h-6 flex items-center justify-center text-xs">
                                            <i class="fas fa-gift"></i>
                                        </div>
                                    </div>
                                    <div class="ml-3">
                                        <p class="font-medium">吴九</p>
                                        <p class="text-sm text-gray-500">6月28日 (18天后)</p>
                                    </div>
                                    <button class="ml-auto bg-blue-500 hover:bg-blue-600 text-white text-sm px-3 py-1 rounded">
                                        送祝福
                                    </button>
                                </div>
                            </div>
                            
                            <button class="w-full mt-6 text-blue-500 hover:text-blue-600 text-center">
                                查看所有生日
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // 移动端菜单切换
        document.getElementById('menu-toggle').addEventListener('click', function() {
            document.getElementById('sidebar').classList.toggle('show');
        });

        // 点击页面其他区域关闭菜单
        document.addEventListener('click', function(event) {
            const sidebar = document.getElementById('sidebar');
            const menuToggle = document.getElementById('menu-toggle');
            
            if (sidebar.classList.contains('show') && 
                !sidebar.contains(event.target) && 
                event.target !== menuToggle) {
                sidebar.classList.remove('show');
            }
        });
    </script>
</body>
</html> 
</html> 